home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet multimedia / Linux LiveCD / GeeXboX 1.0 EN / geexbox-1.0-en.i386.iso / GEEXBOX / var / www / cgi-bin / index.cgi
Text File  |  2006-06-21  |  997b  |  33 lines

  1. #!/bin/sh
  2.  
  3. PATH=/bin:/usr/bin
  4.  
  5. UPTIME=`cat /proc/uptime | cut -f1 -d.`
  6. UP_DAYS=$(($UPTIME/24/3600))
  7. UP_HOURS=$(($(($UPTIME-$(($UP_DAYS*24*3600))))/3600))
  8. UP_MIN=$(($(($UPTIME-$(($UP_DAYS*24*3600))-$(($UP_HOURS*3600))))/60))
  9. UP_SEC=$(($UPTIME-$(($UP_DAYS*24*3600))-$(($UP_HOURS*3600))-$(($UP_MIN*60))))
  10.  
  11. cat <<EOF
  12. Content-type: text/html
  13.  
  14. <?xml version="1.0" encoding="iso-8859-1"?>
  15. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  16. <html>
  17.   <head>
  18.     <title>GeeXboX Management Center</title>
  19.     <meta http-equiv="Content-language" content="en"/>
  20.     <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=ISO-8859-1"/>
  21.     <link rel="icon" type="images/png" href="../img/icon.png"/>
  22.   </head>
  23.   <body>
  24.     <center>
  25.     <img src="../img/logo.jpeg" alt="GeeXboX Logo"/>
  26.     <h1>GeeXboX Management Center</h1>
  27.     <br/>
  28.     Uptime : $UP_DAYS days $UP_HOURS hours $UP_MIN minutes $UP_SEC secondes.
  29.     </center>
  30.   </body>
  31. </html>
  32. EOF
  33.